package com.huawei.aw0;

import java.util.Map;

public class AWResponse {

    private String url;                             // 请求的 URL
    private String method;                          // 请求方法：GET / POST / PUT
    private Map<String, String> headers;            // 实际发送的请求头（不含受限头）
    private String requestBody;                     // 请求体（GET 为 null）
    private int returnCode;                         // HTTP 响应状态码（如 200, 404）
//    private Map<String, String> responseHeaders;    // 响应头（key -> 单值，多值用逗号合并）
    private String responseBody;                    // 响应体内容（字符串）

    public AWResponse() {
    }

    public AWResponse(String url, String method, Map<String, String> headers, String requestBody, int returnCode, String responseBody) {
        this.url = url;
        this.method = method;
        this.headers = headers;
        this.requestBody = requestBody;
        this.returnCode = returnCode;
        this.responseBody = responseBody;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public Map<String, String> getHeaders() {
        return headers;
    }

    public void setHeaders(Map<String, String> headers) {
        this.headers = headers;
    }

    public String getRequestBody() {
        return requestBody;
    }

    public void setRequestBody(String requestBody) {
        this.requestBody = requestBody;
    }

    public int getReturnCode() {
        return returnCode;
    }

    public void setReturnCode(int returnCode) {
        this.returnCode = returnCode;
    }

    public String getResponseBody() {
        return responseBody;
    }

    public void setResponseBody(String responseBody) {
        this.responseBody = responseBody;
    }

    @Override
    public String toString() {
        return "AWResponse{" +
                "url='" + url + '\'' +
                ", method='" + method + '\'' +
                ", headers=" + headers +
                ", requestBody='" + requestBody + '\'' +
                ", returnCode=" + returnCode +
                ", responseBody='" + responseBody + '\'' +
                '}';
    }
}
